#!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2022/5/15 19:33
# @Author : caoshi
# @Version：V1.0
# @File : test06.py
# @desc : while 循环

# a = 1
# while a < 10:
#     print(a)
#     a += 2
#

# 筛选奇数偶数
numbers = [12, 37, 5, 42, 8, 3]
even = []   # 偶数
odd = []    # 奇数

while len(numbers) > 0:
    number = numbers.pop()      # 依次取出 3, 8, 42, 5, 37, 12
    print(number)
    if number % 2 == 0:
        even.append(number)
    else:
        odd.append(number)

print(even)
print(odd)

print(len(numbers))     # 0